<template>
    <div>
        <!-- 内容区域 -->
        <el-card class="cardBox">
            <el-table border style="width: 100%" :data="resultList">
                <el-table-column prop="deviceId" :label="$t('deviceid')">
                </el-table-column>
                <el-table-column prop="deviceType" :label="$t('devicetype')">
                </el-table-column>
                <el-table-column prop="systemVersion" :label="$t('devicesystem')">
                </el-table-column>
                <el-table-column prop="cityName" :label="$t('cityname')">
                </el-table-column>
                <el-table-column prop="macAddress" :label="$t('devicemac')">
                </el-table-column>
                <el-table-column prop="sourceType" :label="$t('networktype')">
                </el-table-column>
                <el-table-column prop="mobileBrand" :label="$t('mobilephonebd')">
                </el-table-column>
                 <el-table-column prop="gmtCreate" :label="$t('logintime')">
                </el-table-column>
                <el-table-column prop="loginResult" :label="$t('loginresults')">
                </el-table-column>
            </el-table>
        </el-card>
    </div>
</template>

<script>
import {
    getloginrecordlist
} from '@/libs/reqlist.js'
export default {
    data() {
        return {
            // 接收返回结果
            resultList: [],
            // 查询入参
            merId: ''
        }
    },
    methods: {
        // 获取登录记录列表
        getLoginRecordList() {
            getloginrecordlist(JSON.stringify({ 'merId': this.merId })).then(res => {
                if (res.data.code === '000000') {
                    this.resultList = res.data.data
                }
            })
        }
    },
    mounted() {
          // 全局商户id
        this.merId = window.sessionStorage.getItem('merId')
        this.getLoginRecordList()
    }
}
</script>

<style lang="less" scoped>
@import './loginRecord.less';
</style>
